home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / qmac215.zip / MACROS.QM < prev    next >
Text File  |  1990-06-27  |  3KB  |  67 lines

  1. *
  2. * MACROS.QM:  Miscellaneous short macros for use with QMAC or
  3. *             in your keyboard definition file (QCONFIG.DAT).
  4. *
  5. * The exact behavior of some of these macros depends on the Insert
  6. * and Indent modes. Also, some of them get weird if you try to use
  7. * them on the last line of the file, because they try to cursor down
  8. * out of the file, which they can't. QEdit 2 makes it easy to clean
  9. * up after them, tho. :-)
  10. *
  11.  
  12. * @c(opy) copies the char in the column above, then moves into the same
  13. * column on the lower line. It's very handy for working with tables, moving
  14. * columns of figures right, etc.
  15.  
  16. @c      MacroBegin GetPrev CursorLeft CursorDown
  17.  
  18. * @d(up) copies the "word" at the cursor to the line below. It's real
  19. * handy for making sequential WriteLn(' commands, etc.
  20.  
  21. @d      MacroBegin MarkBlockBegin WordRight MarkBlockEnd WordLeft CursorDown CopyBlock UnmarkBlock
  22.  
  23. * @g(obble) deletes the char at the cursor and moves down a line, staying in
  24. * the same column. It works real good for moving columns of figures left, etc.
  25. * It fails when the cursor is past the end of the line--it gobbles up the
  26. * end-of-line and joins the next line to the current one.
  27.  
  28. @g      MacroBegin DelCh CursorDown
  29.  
  30. * @h(elp) reads my QCONFIG.DAT file into QEdit for use as a help file. I
  31. * prefer that to using QEdit's own help file capability, because I can
  32. * use QEdit's great search command to find what I need help on, and if I
  33. * wish I can reassign commands to different keys while I'm thinking
  34. * about it. (Note that the use of * comments in your .DAT file lets you
  35. * make it a complete help file.) A similar macro could be used to load
  36. * any particular text file that you had frequent use for.
  37.  
  38. @h      MacroBegin EditFile "c:\qedit\qconfig.dat" Return
  39.  
  40. * @i(nsert) inserts spaces at the cursor, similar to the way @c acts.
  41.  
  42. @i      MacroBegin " " CursorLeft CursorDown
  43.  
  44. * @m(acro) loads a macro file named MACROS.MAC from the current directory.
  45. * This lets me leave specialized macro files scattered around the disk,
  46. * for the applications particular to each subdirectory, then load them without
  47. * having to remember their names or type them it.
  48.  
  49. @m      MacroBegin MacroRead "macros.mac" Return
  50.  
  51. *  ^F2 reloads the current file from disk.  Hit this key, and no matter
  52. *  the state of the editing buffer, the original copy of this file will
  53. *  be reloaded into the editor.  DANGEROUS!
  54. *
  55.  
  56. ^f2  MacroBegin "*" ToggleInsert "*" ToggleInsert EditFile CurrentFilename Return NewFile "N" Return
  57.  
  58. *  Here's a safer version:  this one stops to let you answer the
  59. *  "Save Changes?" prompt.  You will have to hit RETURN to confirm the
  60. *  reload of the file after hitting this key, though.
  61. *
  62. ^f3  MacroBegin EditFile CurrentFilename Return NewFile
  63.  
  64. *
  65. * End of file
  66. *
  67.